
<div class="search-page search-content-1">
    <div class="search-bar ">
        <div class="row">
            <div class="col-md-12">
                <div class="input-group">
                    <input id="search-name" type="text" class="form-control" value="<?=$searchKeywords?>" placeholder="搜索...">
                        <span class="input-group-btn">
                            <button id="btn-search" class="btn blue uppercase bold" type="button">Search</button>
                        </span>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div id="dataList" class="search-container"></div>
        </div>
    </div>
</div>

<script>
    $(function(){
        $("#btn-search").on('click', function () {
            getListByPage(1)
        })
        getListByPage(1);
    })

    function getListByPage(page){
        //参数：
        var param = Object();
        var paramLike = Object();
        var name = $("#search-name").val();
        if(name != "") paramLike['name'] = name;
        param['like'] = paramLike;
        $("#dataList").load("<?=site_url('search/lists')?>/"+page,{"param":JSON.stringify(param)});
    }

</script>